# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AndroidManagement.V1.Model.Application do
  @moduledoc """
  Information about an app.

  ## Attributes

  *   `appPricing` (*type:* `String.t`, *default:* `nil`) - Whether this app is free, free with in-app purchases, or paid. If the pricing is unspecified, this means the app is not generally available anymore (even though it might still be available to people who own it).
  *   `appTracks` (*type:* `list(GoogleApi.AndroidManagement.V1.Model.AppTrackInfo.t)`, *default:* `nil`) - Application tracks visible to the enterprise.
  *   `appVersions` (*type:* `list(GoogleApi.AndroidManagement.V1.Model.AppVersion.t)`, *default:* `nil`) - Versions currently available for this app.
  *   `author` (*type:* `String.t`, *default:* `nil`) - The name of the author of the apps (for example, the app developer).
  *   `availableCountries` (*type:* `list(String.t)`, *default:* `nil`) - The countries which this app is available in as per ISO 3166-1 alpha-2.
  *   `category` (*type:* `String.t`, *default:* `nil`) - The app category (e.g. RACING, SOCIAL, etc.)
  *   `contentRating` (*type:* `String.t`, *default:* `nil`) - The content rating for this app.
  *   `description` (*type:* `String.t`, *default:* `nil`) - The localized promotional description, if available.
  *   `distributionChannel` (*type:* `String.t`, *default:* `nil`) - How and to whom the package is made available.
  *   `features` (*type:* `list(String.t)`, *default:* `nil`) - Noteworthy features (if any) of this app.
  *   `fullDescription` (*type:* `String.t`, *default:* `nil`) - Full app description, if available.
  *   `iconUrl` (*type:* `String.t`, *default:* `nil`) - A link to an image that can be used as an icon for the app. This image is suitable for use up to a pixel size of 512 x 512.
  *   `managedProperties` (*type:* `list(GoogleApi.AndroidManagement.V1.Model.ManagedProperty.t)`, *default:* `nil`) - The set of managed properties available to be pre-configured for the app.
  *   `minAndroidSdkVersion` (*type:* `integer()`, *default:* `nil`) - The minimum Android SDK necessary to run the app.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of the app in the form enterprises/{enterprise}/applications/{package_name}.
  *   `permissions` (*type:* `list(GoogleApi.AndroidManagement.V1.Model.ApplicationPermission.t)`, *default:* `nil`) - The permissions required by the app.
  *   `playStoreUrl` (*type:* `String.t`, *default:* `nil`) - A link to the (consumer) Google Play details page for the app.
  *   `recentChanges` (*type:* `String.t`, *default:* `nil`) - A localised description of the recent changes made to the app.
  *   `screenshotUrls` (*type:* `list(String.t)`, *default:* `nil`) - A list of screenshot links representing the app.
  *   `smallIconUrl` (*type:* `String.t`, *default:* `nil`) - A link to a smaller image that can be used as an icon for the app. This image is suitable for use up to a pixel size of 128 x 128.
  *   `title` (*type:* `String.t`, *default:* `nil`) - The title of the app. Localized.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The approximate time (within 7 days) the app was last published.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appPricing => String.t() | nil,
          :appTracks => list(GoogleApi.AndroidManagement.V1.Model.AppTrackInfo.t()) | nil,
          :appVersions => list(GoogleApi.AndroidManagement.V1.Model.AppVersion.t()) | nil,
          :author => String.t() | nil,
          :availableCountries => list(String.t()) | nil,
          :category => String.t() | nil,
          :contentRating => String.t() | nil,
          :description => String.t() | nil,
          :distributionChannel => String.t() | nil,
          :features => list(String.t()) | nil,
          :fullDescription => String.t() | nil,
          :iconUrl => String.t() | nil,
          :managedProperties =>
            list(GoogleApi.AndroidManagement.V1.Model.ManagedProperty.t()) | nil,
          :minAndroidSdkVersion => integer() | nil,
          :name => String.t() | nil,
          :permissions =>
            list(GoogleApi.AndroidManagement.V1.Model.ApplicationPermission.t()) | nil,
          :playStoreUrl => String.t() | nil,
          :recentChanges => String.t() | nil,
          :screenshotUrls => list(String.t()) | nil,
          :smallIconUrl => String.t() | nil,
          :title => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:appPricing)
  field(:appTracks, as: GoogleApi.AndroidManagement.V1.Model.AppTrackInfo, type: :list)
  field(:appVersions, as: GoogleApi.AndroidManagement.V1.Model.AppVersion, type: :list)
  field(:author)
  field(:availableCountries, type: :list)
  field(:category)
  field(:contentRating)
  field(:description)
  field(:distributionChannel)
  field(:features, type: :list)
  field(:fullDescription)
  field(:iconUrl)
  field(:managedProperties, as: GoogleApi.AndroidManagement.V1.Model.ManagedProperty, type: :list)
  field(:minAndroidSdkVersion)
  field(:name)
  field(:permissions, as: GoogleApi.AndroidManagement.V1.Model.ApplicationPermission, type: :list)
  field(:playStoreUrl)
  field(:recentChanges)
  field(:screenshotUrls, type: :list)
  field(:smallIconUrl)
  field(:title)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidManagement.V1.Model.Application do
  def decode(value, options) do
    GoogleApi.AndroidManagement.V1.Model.Application.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AndroidManagement.V1.Model.Application do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
